import * as types from '../mutation-types.js'
const state ={
	all:[]
}

const getters = {
	allProducts:(state)=>{
		return (id)=>{
			return state.all
		}
	}
}

const actions = {
	getAllProducts({ commit }){
		// commit(types.RECEIVE_PRODUCTS,products)
	}
}

const mutations = {
	[types.RECEIVE_PRODUCTS] (state, products) {
	    state.all = products
	}
}

export default{
	state,
	actions,
	mutations,
	getters
}

